package cn.org.xwb.bookmall.model.properties;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.TimeUnit;

@Configuration
@ConfigurationProperties(prefix = "minio")
@AllArgsConstructor
@NoArgsConstructor
@Data
public class MinioProp {

    /**
     * 要使用的桶
     */
    private String bucket;

    /**
     * 临时文件存储的目录名
     */
    private String tempDir;

    /**
     * 文件访问有效期，单位：天
     */
    private Integer duration;

    /**
     * 有效期时间单位
     */
    private TimeUnit durationUnit = TimeUnit.DAYS;

}
